package com.paranoid.flashcard.model;

import android.graphics.Bitmap;

public class Card {
	
	public static final String KEY_ID = "_id";
	public static final String KEY_TERM = "term";
	public static final String KEY_DEFINITION = "definition";
	public static final String KEY_DECK = "deck_fk";
	public static final String KEY_MASTERY = "mastery";
	public static final String TABLE_NAME = "card";
	
	public static enum Side {A, B};

    private final String mTerm;
    private final String mDefinition;
    private Bitmap mImage;
    private long mId;

    private int mMasteryLevel = 0;

    public Card(long id, String term, String definition, Bitmap image, int masteryLevel) {
        mId = id;
    	mTerm = term;
        mDefinition = definition;
        mImage = image;
        mMasteryLevel = masteryLevel;
    }

    public int getMasteryLevel() {
        return mMasteryLevel;
    }

    public String getTerm() {
        return mTerm;
    }

    public String getDefinition() {
        return mDefinition;
    }

    public void incMasteryLevel() {
        mMasteryLevel++;
    }

    public void resetMasteryLevel() {
        mMasteryLevel = 0;
    }
    
    public Bitmap getImage() {
    	return mImage;
    }

    public long getId() {
    	return mId;
    }
}